<script type="text/javascript" src="<?php echo $root_page;?>/public/js/them1/dropmenu.js"></script>
<div align="left" class="">
    <table cellpadding="0" cellspacing="0" width="100%" class="table_header">
        <col width="220">
        <col width="500">
        <tr>
            <td valign="top">
                <object width="250" height="100">
                	<param  name="wmode" value="transparent" />
                    <embed width="250" height="100" wmode="transparent"  src="<?php echo $root_page ?>/public/images/them1/header/logo_globe.swf"/>
                </object>
            </td>
            <td valign="top">
                <div class="link_top" align="right" style="height: 0px;">
                        <a>Quản lý dự án</a>|
                        <a>Nhà thông minh</a>|
                        <a href="/maccathue/" >Mặc cả thuê</a>
                </div>
                <?php
                    if ($sessionCustomer['customer_user_name'] == '') {
                ?>
                <div class="link_top" align="right">
                    <a href="<?php echo $root_page?>/maccathue/login/" title="Đăng nhập">Đăng nhập </a>|
                    <a href="/maccathue/dangkythanhvien/" title="Đăng ký">Đăng ký </a>
                </div>

                <?php } else{?>
                <div class="link_top" align="right">
                    <a href="/maccathue/thongtin/">Welcome: <?php echo $sessionCustomer['customer_full_name'];?></a>|
                    <a href="/logout/" title="Thoát">Thoát[X]</a>
                </div>
                <?php }?>

    <div id="box-search-top">
        <div align="center">
            <form  action="/search/" method="get" name="frmSearch">
                <table cellspacing="0" cellpadding="0" border="0" id="table1" style="border-collapse: collapse;;-moz-border-radius: 5px; -webkit-border-radius: 5px; border: 1px solid #cacaca; background-color:#ffffff;" >
                    <tbody>
                        <tr>
                            <td align="right" id="keyStatus" class="searchLeftOff" title="Bật/Tắt bộ gõ tiếng Việt"  onclick="changeKeyboard('keyStatus');" style="border-right:1px solid #cacaca;">
                                <a href="javascript:void(0);">
                                    <img border="0" src="<?php echo $sub_domain;?>/images/form/spacer.gif">
                                </a>
                            </td>
                            <td width="250" class="searchText">
                                <input type="text" style="width: 420px;height:30px;padding:1px 10px;background:none repeat top 0 0 transparent;border:medium none;font-size: 12px;" onfocus="javascript:if(this.value=='Nhập từ khóa tìm kiếm'){this.value='';};" onblur="javascript:if(this.value==''){this.value='Nhập từ khóa tìm kiếm';};" value="Nhập từ khóa tìm kiếm" name="keyword" id="input_searchword">
                            </td>
                            <td width="36" onclick="javascript:return doSubmit(0);" class="searchBtn">
                                <img src="<?php echo $sub_domain;?>/images/form/icon_search_2.gif">
                            </td>
                        </tr>
                    </tbody>
                </table>
            </form>
        </div>
    </div>
            </td>
        </tr>
    </table>



</div>
<div id="tabMenu">
    <div id="clear"></div>
    <ul>
        <li id="home_icon"><a href="<?php echo $root_page; ?>">&nbsp;</a></li>
        <?php foreach ($aryRootCategory as $key => $value) {
            ?>
            <li class="menu_divider cpointer">
                <a href="<?php echo $root_page;?>/danhmuc/<?php echo $value['category_id']; ?>/<?php echo $value['category_name_filter']; ?>.html" onmouseout="delayhidemenu()" onmouseover="dropdownmenu(this, event, menu<?php echo $value['category_id']; ?>, '150px')"  ><span><?php echo $value['category_name']; ?></span></a>
            </li>
        <?php } ?>
        <li class="menu_divider cpointer">
            <a href="<?php echo $root_page; ?>/tintuc/">
                Tin tức
            </a>
        </li>
    </ul>
    <div class="clear"></div>
</div>
<script type="text/javascript">
<?php foreach ($arySubcategory as $key => $value) {
    $k = 0; ?>
                    var menu<?php echo $value['category_id']; ?> = [];
    <?php if (is_array($value['sub_category'])) { ?>
        <?php foreach ($value['sub_category'] as $keySub => $sub) { ?>
                menu<?php echo $value['category_id']; ?>[<?php echo $k; ?>] = '<a href="<?php echo $root_page;?>/danhmuc/<?php echo $sub['category_id']; ?>/<?php echo $sub['category_name_filter']; ?>.html"><?php echo $sub['category_name'];
            echo ($sub['category_total_child'] > 0) ? ' &raquo;' : ''; ?></a>';
            <?php $k++;
        } ?>
    <?php } ?>
<?php } ?>
</script>
<script language="javascript">

    function changeKeyboard(id) {
        if (document.getElementById(id).className == "searchLeftOff"){
            //setMethod(1);
            Mudim.SetMethod(2);
            document.getElementById(id).className = "searchLeftOn";
        }
        else{
            //setMethod(-1);
            Mudim.SetMethod(0);
            document.getElementById(id).className = "searchLeftOff";
        }
        return true;
    }
    function doSubmit(){
        if (document.frmSearch.keyword.value.length<3 || document.frmSearch.keyword.value == "Nhập từ khóa tìm kiếm") {
            alert("Từ khóa không được để trống và phải dài hơn 2 ký tự!");
            document.frmSearch.keyword.focus();
            return false;
        }
        document.frmSearch.submit();
        return;
    }
    function OnOf(obj) {
        obj = document.getElementById(obj);
        if(obj.className=="Header")
            obj.className="HeaderPlus";
        else
            obj.className="Header";
    }


</script>
